//
//  CustomerHeadView.m
//  HSApp
//
//  Created by xc on 15/11/9.
//  Copyright © 2015年 xc. All rights reserved.
//

#import "CustomerHeadView.h"

@interface CustomerHeadView ()

@property (nonatomic, strong) UIButton *testBtn;
@property (nonatomic, strong) UIButton *testBtn2;
@end

@implementation CustomerHeadView
@synthesize delegate;
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (!_testBtn) {
        _testBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        [_testBtn setTitle:@"更多" forState:UIControlStateNormal];
        [_testBtn setTitleColor:TextMainCOLOR forState:UIControlStateNormal];
        _testBtn.frame = CGRectMake(50,0, 50, 40);
        [_testBtn addTarget:self action:@selector(moreClick) forControlEvents:UIControlEventTouchUpInside];
        [self addSubview:_testBtn];
    }
    if (!_testBtn2) {
        _testBtn2 = [UIButton buttonWithType:UIButtonTypeCustom];
        [_testBtn2 setTitle:@"更多" forState:UIControlStateNormal];
        [_testBtn2 setTitleColor:TextMainCOLOR forState:UIControlStateNormal];
        _testBtn2.frame = CGRectMake(50,40, 50, 40);
        [_testBtn2 addTarget:self action:@selector(moreClick) forControlEvents:UIControlEventTouchUpInside];
        [self addSubview:_testBtn2];
    }
    return self;
}

- (void)moreClick
{
    [self.delegate headClick];
}

@end
